

/**
 *
 *结果展示面板
 *
 */
 ResultWidget = OpenLayers.Class(BaseWidget,{
 
 	initialize : function() {
	},
	
	getElement : function(){
		if(!this.element){
			if(this.config){
				this.element = this.createElement();	
			}
		}
		
		return this.element;
	},
	
	createElement : function(){
		var $this=this;
		var ResultBox =$('<div id="ResultWidget"></div>');
		if( this.config.top!=null)ResultBox.css('top' ,this.config.top+'px');
		if( this.config.right!=null)ResultBox.css('right' ,this.config.right+'px');
		if( this.config.left!=null)ResultBox.css('left' ,this.config.left+'px');
		if( this.config.bottom!=null)ResultBox.css('bottom' ,this.config.bottom+'px');
		ResultBox.addClass('widget-class');
		ResultBox.css({
			'width' :$this.config.width+'px',
			'height' : $this.config.height+'px',
			'display' :'none'
		});
		
		var ResultBoxRight=$('<div class="tabs">'+
			'<ul>'+
		        '<li><a href="#tabs-1">热点查询</a></li>'+
		    '</ul>'+
		    '<div class="tabs-1" style="">'+
		    	'<div class="rows"></div>'+
		    	'<div class="page" style="padding-left:3px;"></div>'+
		    '</div>'+
		'</div>');
		ResultBoxRight.css({
			'font-size':'12px',
			'width' :$this.config.width-45+'px',
			'float': 'right'
		});
		ResultBox.append(ResultBoxRight);
		var ResultLeft=$("<div id='ResultLeft'><div class='close-but'></div></div>");
		ResultLeft.css({
			'width' :'27px',
			'height' : $this.config.height+'px',
			'float': 'right'
		});
		var margintop=($this.config.height-27)/2;
		ResultLeft.find('.close-but').css({
			'width' :'27px',
			'height' :'45px',
			'cursor' :'pointer',
			'margin-top' : margintop+'px',
			'background-image' : 'url(images/widget/w_history_left_pointer.png)'
		}).mouseover(function(){
			$(this).css({
				'background-color' :'white'
			});
		}).mouseout(function(){
			$(this).css({
				'background-color' :''
			});
		}).toggle(function(){
			ResultBoxRight.animate({width: '0'}, "slow"); 
			ResultBoxRight.hide('slow');
		},
		function(){
			ResultBoxRight.animate({width: $this.config.width-45}, "slow"); 
			ResultBoxRight.show();
		});
		
		ResultBox.append(ResultLeft);
		ResultBoxRight.find('.tabs-1').css({
			'height' :$this.config.height-55+'px',
			'overflow-y' : 'auto'
		});
		ResultBoxRight.tabs();
		return ResultBox;
	}
 });